feat: replace GPAC with FFmpeg for MP4 demuxing #2170
feat: replace GPAC with FFmpeg for MP4 demuxing #2170DhanushVarma-2 wants to merge 2 commits intoCCExtractor:masterfrom
Conversation
Add FFmpeg-based MP4 demuxer as alternative to GPAC, enabled via -DWITH_FFMPEG=ON (sets ENABLE_FFMPEG_MP4). Uses avformat_open_input, av_read_frame, and extradata parsing instead of libgpac. Supports AVC, HEVC, tx3g, c608, c708, and VOBSUB tracks. Existing GPAC path unchanged when FFmpeg is not enabled. Also adds libswresample to CMake FFmpeg dependencies.
006130e to
4039844
Compare
|
The 9 Windows test failures (autoprogram, spupng, startcreditstext) are unrelated to MP4 demuxing — they involve subtitle encoding and credits detection, not the MP4 code path. These same tests pass on the Linux CI run. The Windows build itself was also delayed by a Chocolatey 503 outage when installing GPAC. All 237 Linux tests pass, including the 3 MP4-specific tests. The Linux CI bot also notes this PR fixes 9 previously-broken tests that had never passed before. |
af09ee5 to
87f2178
Compare
87f2178 to
9e95cd7
Compare
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit f377be9...:
Your PR breaks these cases:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit f377be9...:
Your PR breaks these cases:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Adds an FFmpeg-based MP4 demuxing path as an alternative to GPAC, enabled when building with -DWITH_FFMPEG=ON.
When ENABLE_FFMPEG_MP4 is set, processmp4() calls processmp4_ffmpeg() which uses avformat/avcodec instead of libgpac for opening files, reading tracks, and extracting samples. Supports AVC, HEVC, tx3g, c608, c708, and VOBSUB tracks. The existing GPAC path is unchanged and still used when FFmpeg is not enabled.
Also added libswresample to the CMake FFmpeg deps since the Rust library needs it.
Tested locally on macOS (arm64) with various MP4 files. Linux, Mac, and Docker CI all pass. Windows CI is failing due to Chocolatey servers being down (unrelated).